import { defineConfig } from 'vite';
import uni from '@dcloudio/vite-plugin-uni';
import eslint from 'vite-plugin-eslint';
import { resolve } from 'path';

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [
    uni(),
    eslint({
      cache: false,
      exclude: ['node_modules'],
    }),
  ],
  resolve: {
    alias: [
      {
        find: '@',
        replacement: resolve(__dirname, '../'),
      },
      {
        find: 'assets',
        replacement: resolve(__dirname, '../src/assets'),
      },
    ],
  },
});
